//
//  ViewController.m
//  静态库
//
//  Created by 杨庆 on 16/1/14.
//  Copyright © 2016年 双元班. All rights reserved.
//

#import "ViewController.h"
#import "YQTools.h"
#import "YQview.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //1. 添加工具类
    NSLog(@"%ld",[YQTools sumWithNum1:10 andNum2:10]);
    //2. 实现加载一定资源   放在bundle 中避免资源的重复
    UIImageView * imgV = [[UIImageView alloc]initWithFrame:CGRectMake(125, 100, 100, 100)];
    imgV.image = [YQTools loadLogo];
    [self.view addSubview:imgV];
    //3.封装视图
    YQview * view = [[YQview alloc]initWithFrame:CGRectMake(100, 300, 100, 100) andCompelete:^(NSString * msg){
        UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"提示" message:msg delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:nil, nil];
        [alert show];
    }];
    [self.view addSubview:view];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}

@end
